<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@include file="getusersession.jsp"%>
<%
request.setCharacterEncoding("GB2312");
%>
<jsp:useBean id="modcollection" scope="page" class="dsp.web.Collection"/>
<jsp:setProperty name="modcollection" property="name" param="name"/>
<%
String url = request.getParameter("url");
if(url.indexOf("http://") == -1){
	url = "http://"  + url;
}
modcollection.setUrl(url);
modcollection.setId(Integer.parseInt(request.getParameter("id")));
modcollection.setUsername(String.valueOf(session.getAttribute("username")));
modcollection.modCollection();
if(modcollection.isStatus()){
	response.setHeader("Pragma", "no-cache");
	response.setHeader("Expires", "0");
	response.sendRedirect("admincollection.jsp");
}
else{
	out.println("<script language=javascript> alert('"+ modcollection.getMsg() + "'); location.href='admincollection.jsp';</script>");	
}
%>